import request from '@/utils/request'

// 获取用户通知列表
export function getNotifications(userId) {
  return request({
    url: `/api/notifications?userId=${userId}`,
    method: 'GET'
  })
}

// 标记通知为已读
export function markAsRead(notificationId, userId) {
  return request({
    url: `/api/notifications/${notificationId}/read?userId=${userId}`,
    method: 'PUT'
  })
}

// 创建通知
export function createNotification(data) {
  return request({
    url: '/api/notifications',
    method: 'POST',
    data
  })
} 